<!DOCTYPE html>
<html>
<head>
<title>Daftar Anggota Baru</title>
<link href="View/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="View/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link  href="View/bootstrap/js/bootstrap.min.js" rel="stylesheet"/>
<script type="text/javascript" src="View/bootstrap/js/jquery-latest.js"></script>
</head>
<?php
session_start();
if (!isset($_SESSION["id_user"])){
		include '/content/content_header_guest.php';
			} else {
				include '/content/content_header_user.php';
			}
?>
<?php 
	include '../model/member.php';
		if (!isset($_GET['edit'])){
			header('location:./view/login.php');
				} elseif (isset($_GET['edit'])){
					$member = new Member();
					$member2 = $member -> getMemberDetail ($_GET['edit']);
		foreach ($member2 as $id_user => $member2)
{
?>
    <form class="form-horizontal" method="post" action="../index.php?edit_member=<?php echo $member2->id_user; ?>">
		<div class="control-group">
			<label class="control-label" for="inputEmail">Username</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="id_user" value="<?php echo $member2->id_user; ?>" disabled="disabled">
				</div>
    	</div>
					<input type="hidden" id="inputUsername"  name="id_userkat" value="<?php echo $member2->id_userkat; ?>">
					<input type="hidden" id="inputUsername"  name="password" value="<?php echo $member2->password; ?>">
		<div class="control-group">
			<label class="control-label" for="inputEmail">Nama Depan</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="namadepan" value="<?php echo $member2->namadepan; ?>">
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Nama Belakang</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="namabelakang" value="<?php echo $member2->namabelakang; ?>" >
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Alamat</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="alamatuser" value="<?php echo $member2->alamatuser; ?>">
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Telephone</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="notelpuser" value="<?php echo $member2->notelpuser; ?>">
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Kota</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="kotauser" value="<?php echo $member2->kotauser; ?>">
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputEmail">Email</label>
				<div class="controls">
					<input type="text" id="inputUsername"  name="emailuser" value="<?php echo $member2->emailuser; ?>">
				</div>
    	</div>
		<div class="control-group">
			<label class="control-label" for="inputPassword">Kode Pos</label>
				<div class="controls">
					<input type="text" id="inputPassword" name="kodeposuser" value="<?php echo $member2->kodeposuser; ?>">
				</div>
		</div>
					<input type="hidden" id="inputUsername"  name="fotouser" value="<?php echo $member2->fotouser; }}?>">
		<div class="control-group">
			<div class="controls">
					<a href="list_member.php" class="btn ">Batal</a>
					<button type="submit" class="btn">Ubah</button>
			</div>
		</div>
    </form>
</html>
<?php 
include 'content/content_footer.php' 
?>